@mixin keyframes($animation){
  @-webkit-keyframes #{$animation} {
    @content;
  }
  @keyframes #{$animation} {
    @content;
  }
}
@mixin bg-size($backgroundSize){
  background-size:$backgroundSize;
  background-repeat:no-repeat;
  background-position:center;
  display: block;
}

@mixin bg-image($url){
  background-image: url($url + ".png");
  // @media (-webkit-min-device-pixel-ratio: 3),(min-device-pixel-ratio){
  //   background-image url($url + "@3x.png")
  // }
}
@mixin border-1px($color){
  position:relative;
  &:after{
    display: block;
    position: absolute;
    left: 0;
    bottom: 0;
    border-top: 1px solid $color;
    width: 100%;
    content: '';
  }
}
  

@mixin border-none(){
  &:after{
    display: none;
  }
}
/*我自定义的混入 Begin*/
/* 像素转rem */
@function p2r($size) {
    @return $size/100*1rem;
}
@mixin size($w, $h) {
    width: p2r($w);
    height: p2r($h);
}
@mixin mt($size){
    margin-top:p2r($size);
}
@mixin ml($size){
    margin-left:p2r($size);
}
@mixin mr($size){
  margin-right:p2r($size);
}
@mixin mb($size){
    margin-bottom:p2r($size);
}

@mixin w($size){
    width:p2r($size);
}
@mixin h($size){
    height:p2r($size);
}
@mixin bgc($url){
  background:url($url)no-repeat center;
  background-size:100% 100%;
}
@mixin bg($url,$size){
  background:url($url)no-repeat center;
  background-size:$size;
}
@mixin pstl($t,$l){
  position:absolute;
  top:p2r($t);
  left:p2r($l);
}
@mixin pstr($t,$r){
  position:absolute;
  top:p2r($t);
  right:p2r($r);
}
@mixin psc(){
  position:absolute;
  left:50%;top:50%;
  transform:translate(-50%,-50%);
}
@mixin pssc($t){
  position:absolute;
  left:0;right:0;top:p2r($t);
  margin:auto;
}
/* End */
// 用于字体 eg: @include font-dpr(16px);
@mixin font-dpr($font-size) {
    font-size: $font-size;
    [data-dpr="2"] & {
        font-size: $font-size * 2;
    }
    [data-dpr="3"] & {
        font-size: $font-size * 3;
    }
}

@mixin btn($width,$height,$fsize,$radius) {
  display: inline-block;
  font-size: $fsize;
  width: $width;
  height: $height;
  line-height: $height;
  text-align: center;
  border: 1px solid $theme-color;
  border-radius: $radius;
  text-decoration: none;
}